package com.guoqiang.class_two.three;

public class NetPackage extends AbstractPackage implements NetServiceInterface {
    //成员变量
    private double netFlow;        //用于描述上网流量

    //无参构造方法
    public NetPackage() {
    }

    //有参构造方法
    public NetPackage(double netFlow, double mothPostage) {
        setNetFlow(netFlow);
        setMothPostage(mothPostage);
    }

    public double getNetFlow() {
        return netFlow;
    }

    public void setNetFlow(double netFlow) {
        this.netFlow = netFlow;
    }

    //成员方法 显示所有套餐信息
    public void show(){
        System.out.println("上网流量：" + getNetFlow());
        System.out.println("每月资费：" + getMothPostage());
    }

    @Override
    public void newWorkService(double netFlow, MobileCard cardType) {
        System.out.println("上网套餐类实现上网服务接口！");
    }
}
